All Questions
4 questions
0votes
1answer
1kviews
How to call an unknown member function through an instance of a related class?
I have two classes. The first, called Game_Events, controls the objects and manages the general tasks. The second, called Button, is for one of those object instances. The example below is wrong but ...
5votes
4answers
3kviews
Was C designed to facilitate Object-Oriented programming?
I am trying to broaden my understanding of the history and development of object-oriented programming, and I am curious to find out if C was designed to facilitate Object-Oriented programming? (like ...
3votes
3answers
13kviews
Functions returning pointers
C++ noob here. I have a very basic question about a construct I found in the C++ book I am reading. // class declaration class CStr { char sData[256]; public: char* get(void); }; // ...
6votes
2answers
3kviews
Smart Pointers inside class vs Normal Pointers with Destructor
Regarding pointers which are members of classes. Should they be of a smart pointer type or is it enough to simply deal with them in the destructor of the class they are contained in?